const HtmlWebpackPlugin = require('html-webpack-plugin');

module.exports = {
  entry: {
    index: ['./src/scss/index.scss', './src/js/index.js'],
    huxing: ['./src/scss/huxing.scss', './src/js/huxing.js'],
    jituan: ['./src/scss/jituan.scss', './src/js/jituan.js'],
    liuyan: ['./src/scss/liuyan.scss', './src/js/liuyan.js'],
  },
  plugins: [
    new HtmlWebpackPlugin({
      template: "./src/html/index.html",
      filename: "index.html",
      chunks: ["index"]
    }),
    new HtmlWebpackPlugin({
      template: "./src/html/huxing.html",
      filename: "huxing.html",
      chunks: ["huxing"]
    }),
    new HtmlWebpackPlugin({
      template: "./src/html/jituan.html",
      filename: "jituan.html",
      chunks: ["jituan"]
    }),
    new HtmlWebpackPlugin({
      template: "./src/html/liuyan.html",
      filename: "liuyan.html",
      chunks: ["liuyan"]
    }),
  ]
}
